package com.ljw.springsecurity.dao;

import com.ljw.springsecurity.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

/**
 * @author liujw
 * @create 2020/4/25 20:37
 */
@Repository
public interface UserRepository extends JpaRepository<User, Integer> {
    @Query("select u from User u where u.login = ?1  ")
    User findOneByLogin(String login);
}
